package com.etc.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.etc.bean.User;
import com.etc.dao.UserDAO;
@Repository
public class UserDAOImpl extends DAOSupport<User> implements UserDAO {


	@Transactional(readOnly=true,propagation=Propagation.NOT_SUPPORTED)
	@SuppressWarnings("unchecked")
	public User getUser(User user) {
		List<User> list=template.findByExample(user);
		if(list.size()>0){
			return list.get(0);
		}
		return null;
	}
}
